/*This file is part of WZLibCP.

 *  WZLibCP is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

 *  WZLibCP is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

 *  You should have received a copy of the GNU General Public License
    along with WZLibCP.  If not, see <http://www.gnu.org/licenses/>.
		
	Author: calc0000
*/
#ifndef __WZLIB_WZPNGPROPERTY_H
#define __WZLIB_WZPNGPROPERTY_H
#include "WZLibConfig.h"

#include <string>

#include "SDL/SDL.h"

#include "WZImageProperty.h"
#include "WZBinaryReader.h"

namespace WZLib{
	class WZPNGProperty:public WZImageProperty{
	protected:
		int				_width;
		int				_height;
		int				_length;
		int				_format;
		int				_format2;
		bool			_pngParsed;
		byte*			_compBytes;
		SDL_Surface*	_png;
		WZBinaryReader*	_reader;
	public:
		//Constructor
		ctor			WZPNGProperty(WZImage* parent=NULL,std::string name="",WZBinaryReader* reader=NULL);
		//Destructor
		dtor			~WZPNGProperty();
		//Getters/setters
		int				width();
		int				height();
		SDL_Surface*	png();
		int				format();
		bool			pngParsed();
		//Parse
		ErrorCode		parse(WZBinaryReader* reader);
	};
};

#endif